home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / init.d / mountkernfs.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2006-10-06  |  1.1 KB  |  54 lines

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:          mountkernfs
  4. # Required-Start:
  5. # Required-Stop:
  6. # Default-Start:     S
  7. # Default-Stop:
  8. # Short-Description: Mount kernel virtual file systems.
  9. # Description:       Mount initial set of virtual filesystems the kernel
  10. #                    provides and that are required by everything.
  11. ### END INIT INFO
  12.  
  13. PATH=/lib/init:/sbin:/bin
  14.  
  15. . /lib/lsb/init-functions
  16. . /lib/init/mount-functions.sh
  17.  
  18. do_start () {
  19.     #
  20.     # Mount proc filesystem on /proc
  21.     #
  22.     domount proc "" /proc -onodev,noexec,nosuid
  23.  
  24.     #
  25.     # Mount sysfs on /sys
  26.     #
  27.     domount sysfs "" /sys -onodev,noexec,nosuid
  28.  
  29.     # Mount /var/run and /var/lock as tmpfs.
  30.     domount tmpfs "" /var/run -omode=0755,nodev,noexec,nosuid
  31.     domount tmpfs "" /var/lock -omode=1777,nodev,noexec,nosuid
  32. }
  33.  
  34. case "$1" in
  35.   "")
  36.     echo "Warning: mountvirtfs should be called with the 'start' argument." >&2
  37.     do_start
  38.     ;;
  39.   start)
  40.     do_start
  41.     ;;
  42.   restart|reload|force-reload)
  43.     echo "Error: argument '$1' not supported" >&2
  44.     exit 3
  45.     ;;
  46.   stop)
  47.     # No-op
  48.     ;;
  49.   *)
  50.     echo "Usage: mountvirtfs [start|stop]" >&2
  51.     exit 3
  52.     ;;
  53. esac
  54.